The present invention relates generally to data communication, and more specifically, to a system and a method of high-speed detection handshaking between Universal Serial Bus (USB) devices in a USB based data communication system.
USB is a serial bus standard that facilitates data communication. USB Implementers Forum (USB-IF) is an industry standards body that defines the standardized USB specification. To date, three versions of the USB specification have been released, namely, USB 1.1, USB 2.0 and USB 3.0.
Referring to FIG. 1, a USB system 100 includes a USB host 102 and one or more USB devices such as one or more USB hubs 104 and one or more USB functions 106. The USB host 102 includes a root hub 108. The USB system 100 further includes a USB interconnect 110. In accordance with the USB specification, each USB system 100 includes the USB host 102 and one or more USB devices interconnected in a tiered star topology using the USB interconnect 110.
The USB host 102 is a computational system that controls the USB system 100. The root hub 108 or the USB host 102 provides a connection interface for connecting one or more of the USB devices to the USB host 102. The USB hub 104 is a USB device that provides a connection interface for one or more USB functions 106 to connect to the USB system 100. The USB function 106 is a USB device that enables one or more functionalities in the USB system 100 such as mouse, keyboard, storage devices, imaging devices, and audio and video applications.
The USB interconnect 110 defines the connection between the USB host 102 and the USB devices. The USB interconnect 110 has a tiered star topology for interconnecting the USB host 102 and the USB devices in the USB system 100. The USB host 102 is at the center of the tiered star topology. Each connection between the USB host 102 and a USB device or between one USB device and another USB device is a point-to-point connection. All the point-to-point connections in the USB system 100 together constitute the USB interconnect 110.
In accordance with USB 2.0, when two devices are directly connected to each other through the USB interconnect 110, the USB device logically closer to the USB host 102 in a data transfer path is referred to as an upstream device and the USB device logically farther from the USB host 102 in the data transfer path is referred to a downstream device. As used herein, the term ‘USB hub’ refers to the USB hub 104 as well as the root hub 108 and the term ‘USB device’ refers to the USB hub 104 as well as the USB function 106, unless specifically mentioned otherwise.
The data transfer rates between versions of the specification have increased significantly. USB 1.1 defined low-speed and full-speed communication modes, which enabled data transfer rates of 1.5 Mbits/s and 12 Mbits/s respectively. USB 2.0 introduced a high-speed communication mode, which enabled a data transfer rate of 480 Mbits/s, and USB 3.0 has introduced a super-speed communication mode, which enables a data transfer rate of 5.0 Gbits/s.
USB 2.0 requires that USB devices are backward compatible. When a USB device is connected to a USB hub, the USB hub detects the data transfer capability of the USB device and a communication mode supported by both the USB hub and the USB device is selected. Thus, a high-speed capable USB device must be able to communicate with a full-speed capable hub in full-speed communication mode. To ensure backward compatibility, a high-speed capable USB device initially connects to a USB hub as a full-speed device. The USB hub and the USB device engage in high-speed detection handshaking based on chirp signaling. In addition, whenever the USB hub resets the USB device, irrespective of the state of the USB device before the reset signaling, the USB hub and the USB device engage in high-speed detection handshaking.
Referring now to FIGS. 2A and 2B, an example of a USB hub 202 and a USB device 204 participating in high-speed handshaking in the USB system 100 are shown. The USB hub 202 and the USB device 204 are connected by a USB cable 206. The USB cable 206 includes a voltage wire 208, a first data line (DP) 210, a second data line (DM) 212, and a ground wire 214. The first data line 210 and the second data line 212 are collectively referred to as a USB bus 216.
The data is transmitted between the USB hub 202 and the USB device 204 using half-duplex differential signaling on the USB bus 216. The voltage wire 208 delivers power to the USB device 204 and the ground wire 214 provides a connection to ground voltage level in the USB system 100.
In accordance with USB 2.0, each USB device includes a transceiver (not shown) to transmit and receive signals. The USB hub 202 includes a first transceiver and the USB device 204 includes a second transceiver. Accordingly, the first transceiver of the USB hub 202 is a downstream transceiver and the second transceiver of the USB device 204 is an upstream transceiver. The first and the second transceivers implement a set of common functionalities (as will be explained in conjunction with FIG. 5).
Each transceiver includes a squelch detector (not shown) that indicates the validity of the differential signal. During communication between the USB devices, if the differential signal between the first data line 210 and the second data line 212 is below a first threshold voltage level VL, the differential signal is considered invalid. The differential signal between the first data line 210 and the second data line 212 should exceed a second threshold voltage level VH to be qualified as a valid signal. In accordance with USB 2.0, VL=100 mV and VH=150 mV.
During high-speed detection handshaking, the USB hub 202 asserts a reset signaling on the USB bus 216. The USB hub 202 drives the first and second data lines 210 and 212 to ground (driven SE0 state) at reset time instant (T0). The USB hub 202 asserts the reset signaling for a predefined time interval (TDRST) in accordance with USB 2.0.
The USB device 204 detects the reset signaling and ensures that the second transceiver of the USB device 204 is in a full-speed communication mode. Subsequently, the USB device 204 transmits a device chirp to the USB hub 202. The device chirp signal is generated by injecting a predefined amount of current onto the second data line (DM) 212 for a predefined time interval. The device chirp signal is referred to as device K-chirp signal. In accordance with USB 2.0, the device chirp signal should be initiated at a time instant not less than 1.0 ms (TUCH) and not more than 7.0 ms (TUCHEND) after the reset time instant (T0).
If the USB hub 202 successfully detects the device chirp signal and is high-speed capable, it transmits a sequence of hub chirp signals to the USB device 204. The sequence of hub chirp signals is generated by injecting a predefined amount of current alternately onto the second data line (DM) 212 and the first data line (DP) 210. The injection of current on the second data line (DM) 212 and the first data line (DP) 210 leads to hub chirp signals referred to as hub K-chirp signal and hub J-chirp signal respectively. The sequence of hub chirp signals is initiated within 100 μs (TWTDCH) from the detection of the device chirp signal. Each of the hub chirp signals must last for no less than 40 μs and no more than 60 μs, and there must not be any idle states between the hub chirp signals.
The USB device 204 switches to high-speed communication mode based on successful detection of the sequence of hub chirp signals. However, if the USB host 202 is not high-speed capable, it does not transmit the sequence of hub chirp signals and the USB device 204 remains in the full-speed communication mode at the end of the reset signaling. Thus, a high-speed capable USB hub 202 and a high-speed capable USB device 204 must successfully accomplish high-speed detection handshaking to communicate in high-speed communication mode. The process of high-speed detection handshaking is described in detail in the USB 2.0 specification.
Referring now to FIG. 3, a schematic circuit diagram illustrating the USB hub 202, the USB device 204, and the USB bus 216 during high-speed detection handshaking in the USB system 100 is shown. The USB host 202 includes a high-speed termination resistor bank 302 and a pull-down resistor bank 304. Similarly, the USB device 204 includes a high-speed termination resistor bank 306 and a pull-up resistor 308. The bus voltage provided by the voltage wire 208 is VBUS. It is to be noted that the resistor banks 302 and 304 are internal to the USB host 202 and the resistor bank 306 and resistor 308 are internal to the USB device 204; these elements are shown outside only for clarity of representation.
During the high-speed detection handshake, the high-speed termination resistor bank 302 and the pull-down resistor bank 304 are connected to the USB bus 216. The high-speed termination resistor bank 306 is disconnected and instead the pull-up resistor 308 is connected to the first data line 210. In this state, an offset voltage appears on the first data line 210 and accordingly, the voltage level at the first data line 210 is not precisely at ground level, which is expected in the ideal case.
In accordance with the USB 2.0, each resistor in the high-speed termination resistor banks 302 and 306 should be 45 Ohm (+/−5%), each resistor in the pull-down resistor bank 304 should be 15 KOhm (+/−5%) and the pull-up resistor 308 should be 1.5 KOhm (+/−5%). Further, the bus voltage should be 3.3 V (+/−0.3V). If the high-speed termination resistor bank 302 has resistors of 49.5 Ohm, the pull-up resistor 308 is 0.9 KOhm resistor, and the bus voltage is 3.6 V, the offset voltage may be as high as 186 mV, in which case the squelch detector will indicate that the differential signal on the USB bus 216 is a valid signal. Therefore, the differential signal may be detected as a ‘J-state’ of the USB system 100. Thus, the USB hub 202 will detect an incorrect state of the USB bus 216. Accordingly, the high-speed detection handshake is aborted and the USB hub 202 and the USB device 204 establish a communication link in the full-speed communication mode. Thus, the offset voltage appearing on the first data line (DP) 210 may lead to an unsuccessful high-speed detection handshake and hence, must be addressed.
Referring now to FIG. 4, a first signal profile 402 of the first data line 210, a second signal profile 404 of the second data line 212, and a line state profile 406 during the high-speed detection handshake in the USB system 100 is shown.
The first signal profile 402 shows variation in voltage level of the first data line 210. Similarly, the second signal profile 404 shows variation in voltage level of the second data line 212. The line state profile 406 shows an ideal variation in a line state of the USB bus 216 during the high-speed detection handshake.
The line state of the USB bus 216 is based on the voltage levels in the first data line 210 and the second data line 212. The line state is used in the USB hub 202 and the USB device 204 to process the signals received on the USB bus 216. In accordance with USB 2.0, the following four line states are defined—SE0 (DM=0, DP=0); J-State (DM=0, DP=1); K-State (DM=1, DP=0); and SE1 (DM=1, DP=1), where DP and DM are logical values corresponding to the voltage levels of the first data line 210 and the second data line 212 respectively.
As shown in FIG. 4, the USB host 202 asserts a reset signaling on the USB bus 216 by pulling down the voltage levels of the first and second data lines 210 and 212 to ground level at time T0. The corresponding line state should be detected as SE0. The USB device 204 transmits a device chirp from time T1 to time T2. The line state should change from SE0 to K-State. If the USB hub 202 detects the device chirp signal, it initiates a sequence of hub chirp signals from time T3. The line state should alternate between the K-State and the J-State between times T3 and T4.
However, due to the offset voltage present on the first data line 210, the squelch detector may indicate a valid signal on the USB bus 216 and a J-State of the USB bus 216 may be detected between the times T0 and T1 and the times T2 and T3. This incorrect line state detection will cause the high-speed handshake detection to abort. Consequently, though the USB hub 202 and the USB device 204 are high-speed capable, they will eventually only establish a communication link in full-speed communication mode.
It would be advantageous to have a USB device that can accurately conduct a high-speed detection handshake so that data can be transmitted between USB devices at a maximum available rate.